/*
 * @Description: Vue绑定原型方法
 * @Author: DHL
 * @Date: 2022-01-16 12:12:12
 * @LastEditors: DHL
 * @LastEditTime: 2022-01-16 12:20:08
 */

import type { App } from 'vue'
import { useCacheData } from '../hooks/web/cacheData'

export function setupGlobalProperties(app: App<Element>) {
  const { getDic, getDicName, getDicValue, getDicObj, getSysConfig } = useCacheData()

  app.config.globalProperties.$getDic = getDic
  app.config.globalProperties.$getDicObj = getDicObj
  app.config.globalProperties.$getDicName = getDicName
  app.config.globalProperties.$getDicValue = getDicValue
  app.config.globalProperties.$getSysConfig = getSysConfig
}
